import request from '@/utils/request'

// 商品详情页发起的axios请求

export const goodsDetail = (goodsCode)=>{
    request.defaults.headers.common['token'] = 'eyJqdGkiOiJSSml6RUI3clBIIiwiaWF0IjoxNjA0MzEwNDY2LCJjaGFubmVsIjoiMSJ9.PclnHqy_GTMjNjDmDN6Z-Ce15ClDophN9ao4pv_e_Hs';
    let url = `/api/rest/h5Goods/goodsDetail?goodsCode=${goodsCode}`
    console.log(url);
    return request.get(url)
}

export const goodsEnjoy = ()=>{
    request.defaults.headers.common['token'] = 'eyJqdGkiOiJSSml6RUI3clBIIiwiaWF0IjoxNjA0MzEwNDY2LCJjaGFubmVsIjoiMSJ9.PclnHqy_GTMjNjDmDN6Z-Ce15ClDophN9ao4pv_e_Hs';
    request.defaults.headers.common['brand'] = 'SELECTED';
    let urlEnjoy = `/api/api/goods/dmpRecommendGoods?projectName=detail-gender&brand=four&itemId=420414054&userId=SLT0008365067&brandCode=SELECTED`
    return request.get(urlEnjoy)
}
